#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>


int main()
{
	FILE* fe;
	fe = fopen("a.txt", "w");
	char ch;
	ch = getchar();
	while (ch != '#')
	{
		fputc(ch, fe);
		ch = getchar();
	}
	fclose(fe);
	fe = fopen("a.txt", "r");
	ch = fgetc(fe);
	while (ch != EOF)
	{
		putchar(ch);
		ch = fgetc(fe);

	}






	return 0;
}

